import time
from selenium.webdriver.common.by import By


def loan(driver, money, day):
    driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[3]/a").click()
    driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[3]/ul/li[2]/a").click()

    driver.find_element(By.ID, "amount").send_keys(money)
    driver.find_element(By.ID, "term").send_keys(day)
    driver.find_element(By.ID, "submit").click()
    time.sleep(1)
    driver.find_element(By.XPATH, "/html/body/div[2]/div[2]/div/div/div/div/div/div/div/div[4]/button[1]").click()
    time.sleep(3)